import React , {useState} from 'react'
import Graphiql from './Graphiql'

export default function App() {
    // const [text, settext] = useState("");
    const query=`
        query getFilmList($name:String!){
            getFilmList{
                id,
                name,
                price
            }
        }
    `
  return (
    <div>
        {/* <input onChange={(e)=>{
            settext(e.target.value)
        }}/> */}
        <Graphiql query={query}>
            {/* {
                ({loading,data})=>loading?<div>正在加载中...</div>:data.getFilmList.map(item=><li key={item.id}>{item.name}</li>)
            } */}
        </Graphiql>
    </div>
  )
}
